﻿@using System.Configuration
@using ECG.Utility
@using ECG.WebUI.CustomHelpers
@using ECG.WebUI.Models
@model List<ECG.Common.NewsListHomeDto>
@if (Model.Any())
{
    <div class="box-list-news">
        <ul>
            @foreach (var item in Model)
            {
                var nDetailLink = Url.Action("NewsDetail", "News", new { id = item.Id, newsTitle = StringUtil.RemoveSpecialCharactersVn(item.Title) });
                var hostContainImages = ConfigurationManager.AppSettings["HostContainImages"];
                <li class="clearfix">
                    <a href="@nDetailLink" class="lnkImg">
                        <img src="@hostContainImages/upload/NewsDetail/@item.ImagePath?width=125&height=125" width="125" height="125" alt="@item.Title" />
                    </a>
                    <div class="box-ews-info">
                        <a href="@nDetailLink" class="lnktitle">
                            <h3 class="lisr-news-title">@item.Title</h3>
                        </a>
                        <p>
                            @item.Summary
                            <br />
                            <a href="@nDetailLink">Đọc tiếp
                                <span class="meta-nav">→</span>
                            </a>
                        </p>
                    </div>
                </li>
            }
        </ul>
    </div>
    <!--PHAN TRANG SAN PHAM-->
    <div class="bb_pagging">
        @Html.PageLinksOnProductListCatePage((PageInfo)ViewBag.PageInfo, i => Url.Action("Index", "News", new { page = i }))
    </div>
    <!--END PHAN TRANG SAN PHAM-->
}